package br.ueg.ezrides.modelo.entidades;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.Table;

import br.com.vexillum.model.CommonEntity;
import br.com.vexillum.model.annotations.SearchField;
import br.com.vexillum.model.annotations.ValidatorClass;

@SuppressWarnings("serial")
@ValidatorClass
@Entity
@Table(name="estados")
public class Estado extends CommonEntity {

	@SearchField
	@ManyToOne(fetch=FetchType.LAZY)
    @JoinColumn(name="id_pais", unique=false, nullable=false, updatable=true)
	private Pais pais;
	
	@SearchField
	@Column(name="nome", unique=false, nullable=false, updatable=true, length=200)
	private String nome;
	
	@SearchField
	@Column(name="sigla", unique=false, nullable=false, updatable=true, length=20)
	private String sigla;

	public String getNome() {
		return nome;
	}

	public void setNome(String nome) {
		this.nome = nome;
	}

	public String getSigla() {
		return sigla;
	}

	public void setSigla(String sigla) {
		this.sigla = sigla;
	}

	public Pais getPais() {
		return pais;
	}

	public void setPais(Pais pais) {
		this.pais = pais;
	}
	
}
